package by.koleda.photoupdater.provider;

import android.net.Uri;
import android.provider.BaseColumns;

public class PhotoContract {

	interface VkContactsColumns {

		public static final String CONTACT_ID = "uid";

		public static final String FIRST_NAME = "first_name";

		public static final String LAST_NAME = "last_name";

		public static final String PHOTO_URL = "photo";

		public static final String HOME_PHONE = "home_phone";

		public static final String MOBILE_PHONE = "mobile_phone";

	}
	
	interface SuggestionsColumns {
		
		public static final String CONTACT_ID = "id";
		
		public static final String VKCONTACT_ID = "vkcontact_id";
		
		public static final String VKLINKED = "vklinked";
		
		public static final String VKPOINTS = "vkpoints";
		
	}

	public static final String CONTENT_AUTHORITY = "by.koleda.photoupdater.provider.PhotoProvider";

	public static final Uri BASE_CONTENT_URI = Uri.parse("content://"
			+ CONTENT_AUTHORITY);

	private static final String PATH_VKCONTACTS = "vkcontacts";
	
	private static final String PATH_SUGGESTIONS = "suggestions";
	
	

	public static class PhotoColumns implements VkContactsColumns, BaseColumns {

		private PhotoColumns() {
		}

		public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon()
				.appendPath(PATH_VKCONTACTS).build();
		
		public static Uri buildContactUri(String contactId) {
            return CONTENT_URI.buildUpon().appendPath(contactId).build();
        }

		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.photoupdater.vkcontact";
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.photoupdater.vkcontact";

	}
	
	public static class Suggestions implements SuggestionsColumns, BaseColumns {
		
		private Suggestions() {
		}
		
		public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon()
				.appendPath(PATH_SUGGESTIONS).build();
		
		public static final Uri buildSuggestionUri(String contactId) {
			return CONTENT_URI.buildUpon().appendPath(contactId).build();
		}
		
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.photoupdater.suggestion";
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.photoupdater.suggestion";
	}

	public PhotoContract() {
	}

}
